home *** CD-ROM | disk | FTP | other *** search
- Path: gramercy.ios.com!lalit
- From: lalit@gramercy.ios.com (lalit gidwani)
- Newsgroups: comp.lang.c++
- Subject: Re: Template Class Linkage?
- Date: 9 Jan 1996 02:17:43 GMT
- Organization: Internet Online Services
- Message-ID: <4csj87$cfl@news2.ios.com>
- References: <4cmnjs$mk7@mimsy.cs.umd.edu>
- NNTP-Posting-Host: gramercy.ios.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- Gil Carmel (gilman@cfar.umd.edu) wrote:
- : Hi,
-
- : I'm just learning templates, and I'm having problems with linkage.
- : When the template class member function bodies are included in the ".h" file,
- : everything is fine. But when the function bodies are in a separate ".c" file,
- : calls to these functions from other files give an "undefined reference to
- : function" error from the linker. Do template class member functions have
- : to be in the ".h" file, or is this a problem with my compiler?
-
- : Thanks for any help,
- : Gil
-
- : --
- : |-----------------------------------------------------------|
- : | Gil Carmel | gilman@wam.umd.edu |
- : | Computer Science Undergraduate | gilman@cfar.umd.edu |
- : | University of Maryland | |
- : | College Park, MD | |
- : |-----------------------------------------------------------|
- : | | \o | |
- : | | |\ | |
- : | | / \ | |
-